package com.aaa.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author 荆豪峰
 * @version 1.0
 */
@Component
@Aspect
public class LogAdvice {
    @Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
    private void logJoinPoint(){}

    @Before("logJoinPoint()")
    public void before(){
        System.out.println("添加getTest的前置日志");
    }
}
